param n;
param maxcovers; 
set PROPERTIES;
set N := 1..n;
set MAX_COVERS := 1..maxcovers; # Set of indices for the COVERS.
set COVERS{MAX_COVERS} within {1..n} default {}; #set of COVERS
#COVERS[j] is the jth cover. It consists of a collection of items. 

param inputdata{N,PROPERTIES} >= 0;
param MaxCapacity;

var y{N} <=1 >=0; #Variables of the relaxed problem.



maximize Total_Benefit:
sum{i in N} y[i]*inputdata[i,'Benefit'];

subject to Max_Weight:
sum{i in N} y[i]*inputdata[i,'Weight'] <= MaxCapacity;


subject to Covers{j in MAX_COVERS : card(COVERS[j]) <>0}:
sum {i in COVERS[j]} y[i] <=card(COVERS[j])-1;
